<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html;" charset="utf-8" />
    <title>Ngoa long</title>
    <link type="image/x-icon" href="<?php echo base_url();?>public/favicon.ico" rel="icon" />
    <?php echo link_tag('assets/css/style.css'); ?>
    <?php echo link_tag('assets/css/style1.css'); ?>
    <?php echo link_tag('assets/css/nivo-slider.css'); ?>
    <script type="text/javascript" src="<?php echo base_url('assets/scripts/jquery-1.7.1.min.js');?>"></script>
    <script type="text/javascript" src="<?php echo base_url();?>public/temp/js/jquery.validate.min.js"></script>
    <script type="text/javascript" src="<?php echo base_url();?>public/temp/js/jquery.numeric.js"></script>

</head>
<body>
    <div id="wraper">
        <div id="header">
            <?php
            if(!check_login_user())
            {
                ?>
                <div class="dangnhap">
                    <form action="#" id = "login" name="login" method="post">
                        <input style="width: 110px;" type="text" id="username" name="username" value="Username" onfocus="this.value=(this.value=='Username') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Username' : this.value;">
                        <input style="width: 110px;" type="password" id="password" name="password" value="Password" onfocus="this.value=(this.value=='Password') ? '' : this.value;" onblur="this.value=(this.value=='') ? 'Password' : this.value;">
                        <input style="width: 50px;" id="button_login" type="submit" id="dangnhap" name="" value="Login"/>
                        <a style="color: #ffffff;" href="<?php echo site_url('user/register_form'); ?>">Đăng kí</a>
                    </form>
                </div>
                <?php }?>

            <?php
            if(check_login_user())
            {
                ?>

                <div class="avata">
                    <a href="<?php echo site_url('user/profile') ?>"><img style="width: 30px;" src="<?php echo info_from_session_user(2); ?>"/></a>
                    <a id="user" href="<?php echo site_url('user/profile') ?>">Chào bạn <?php echo info_from_session_user(1) ?> </a>
                    <form action="">
                        |<a href="<?php echo site_url('user/logout');?>" id="logout"  name=""> Logout</a>
                    </form>
                </div>
                <?php }?>
            <ul id="mainNav">
                <li><a href="<?php echo site_url('');?>">Home</a></li>
                <li><a href="<?php echo site_url('cart/show_cart'); ?>">Cart</a></li>
                <li><a href="#">contact</a></li>
                <li><a href="#">About</a></li>
            </ul>
        <div id="searchbox">
            <form id="searchform" action="<?php echo site_url('product/search');?>" method="get">
                <p>
                    <input name="search" type="text" id="s" placeholder="search" value=""/>
                </p>
            </form>
        </div>
        </div><!--end header-->
